package com.Jian.reggie.common;

/**
 * ClassName: BaseContext
 * Package: com.Jian.reggie.common
 * Description:
 *
 * @Author 蹇泽阳
 * @Create 2023/11/27 11:38
 * @Version 1.0
 */
// 用于存放当前登录用户的ID
public class BaseContext {
  private static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
  
  public static void setCurrentId(Long id) {
    threadLocal.set(id);
  }
  
  public static Long getCurrentId() {
    return threadLocal.get();
  }
}
